package yunquan.wang.test.importData;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;

public class ExcelUitls {

	public static String getCellValue(Row row,int no)
	{
		Cell cell= row.getCell(no);
		if(cell==null)
			return "";
		switch (cell.getCellType())
		{
		case Cell.CELL_TYPE_NUMERIC:
			return new Integer(new Double(cell.getNumericCellValue()).intValue()).toString();
		case Cell.CELL_TYPE_STRING:
			return cell.getStringCellValue();
			default :
				return cell.getStringCellValue();
		}
	
	}

}
